package com.example.logistics_manage.Utils;

import com.example.logistics_manage.pojo.Orders;
import com.example.logistics_manage.pojo.Vehicle;
import org.springframework.stereotype.Component;

@Component
public class IsEmptyExam {
    public boolean examVehicleData(Vehicle vehicle){
       return  ((vehicle.getVehicleNum() == null || vehicle.getVehicleNum() .equals("")) &&
                (vehicle.getDriverName() == null || vehicle.getDriverName().equals(""))&&
                (vehicle.getCarrierName() == null || vehicle.getCarrierName().equals("")));
    }

    public boolean examOrdersData(Orders orders){
       return   (orders.getOrderId() == null  &&
                (orders.getCustomerName() == null || orders.getCustomerName().equals(""))&&
                (orders.getConsignor()==null ||  orders.getConsignor().equals("")));
    }
}
